Skip to content

Conversation

kiwi-josh
Copy link

So that its easy for consumers of the FCM gem to make custom requests directly to the firebase http API's if/when required

Such as hitting the https://iid.googleapis.com/iid/v1:batchImport endpoint to bulk import and convert apns tokens to FCM tokens: https://developers.google.com/instance-id/reference/server#create_registration_tokens_for_apns_tokens

…M gem to make custom requests directly to the firebase http API's if/when required
scope: scope,
)
token = @authorizer.fetch_access_token!
token["access_token"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

scope = "https://www.googleapis.com/auth/firebase.messaging"
@authorizer ||= Google::Auth::ServiceAccountCredentials.make_creds(
json_key_io: json_key,
scope: scope,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call.

@@ -217,6 +217,16 @@ def send_to_topic_condition(condition, options = {})
end
end

def jwt_token
scope = "https://www.googleapis.com/auth/firebase.messaging"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant